home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 2.2 KB | 52 lines | [TEXT/GEOL] |
- Item 8156378 15-Aug-89 20:20
-
- From: JOAQUIN1 Joaquin, James,APL
-
- To: ARGII Argii Design Group, M Demeyer,PRT
-
- cc: MACAPP.TEST MacApp SQA Team,APL
- MACAPP.TECH$ MACAPP Tech
-
- Sub: re: scrollers & TTEViews
-
- Anh,
- my team encountered the same problem with TEViews killing their superview's
- scroller in MacApp 2.0b9. The situation was as follows - a TMyTEView
- (descendent of TTEView) was made a sub-view of a TDrawingView (descendent of
- TView). The TDrawingView was the one-and-only sub-view of a TScroller. The
- scroll bars are initially active, as the TDrawingView is a large, fixed size,
- but as soon as the TMyTEView is added the scroll bars are permanently
- deactivated. The culprit, as you point out, is TTEView.ITEView:
- TTEView.ITEView calls TTEView.BeInScroller(itsScroller),
- which calls the INHERITED TView.BeInScroller(itsScroller),
- which calls the dreaded itsScroller.SetScrollLimits(scrollLimits, TRUE),
- where scrollLimits is effectively the bottom right corner of TMyTEView.
-
- This kills my scroll bars, since the size of my scroller is now much smaller
- than my TDrawingView. I don't know why TTEView.ITEView is calling
- BeInScroller, as TTEView.IRes does not call it, and as far as I can tell the
- vanilla TScroller is designed to handle one-and-only-one sub-view.
-
- My first guess at a workaround was to OVERRIDE BeInScroller in the TMyTEView
- class and have it do nothing. This caught the call before it reached
- TView.BeInScroller. It kept my TScroller intact, but caused lots of bizzare
- and undesirable autoscrolling while editing the TMyTEView.
-
- Since I did not want to muck around in FUNCTION Autoscroll inside
- UTEView.Globals.p, I removed the BeInScroller Override and instead overrode
- TView.GetScroller as follows:
-
- FUNCTION TMyTEView.GetScroller(immediateSuperView:BOOLEAN):TScroller; OVERRIDE;
- BEGIN
- GetScroller := NIL;
- END;
-
- This tells anyone who's interested that TMyTEView has no scroller whatsoever,
- and both keeps the scroller intact and behaves normally (except that it has
- zero scrolling within the TMyTEView). It scrolls perfectly when its superview
- is scrolled.
-
- Hope this is of use,
- -- Jamie.
-
-